package com.qiu.DitingPlatform.common;

import lombok.Getter;

/**
 * 错误码枚举类
 *
 * @author ：qiu
 */

@Getter
public enum ErrorCode {

    SUCCESS(0, "ok", "成功"),
    PARAM_ERROR(4000, "请求参数错误", "参数错误"),
    NO_LOGIN(40001, "未登录", "没有登录"),
    PARAM_NOT_NULL(40002, "请求参数为空", "参数为空"),
    SQL_ERROR(40003, "数据库操作错误", "查询语句返回错误"),
    NO_AUTH(40100, "无权限", "无权限访问"),
    SYS_ERROR(50000, "系统错误", "系统错误"),
    ;

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误信息
     */
    private final String message;
    /**
     * 错误描述
     */
    private final String description;

    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

}
